class JinLiang:
    def __init__(self, jin, liang):
        self.jin = jin
        self.liang = liang

    def to_total_liang(self):
        return self.jin * 16 + self.liang

    def __str__(self):
        return f"{self.jin}斤{self.liang}两"

    def __lt__(self, other):
        return self.to_total_liang() < other.to_total_liang()

    def __eq__(self, other):
        return self.to_total_liang() == other.to_total_liang()

    def __add__(self, other):
        total = self.to_total_liang() + other.to_total_liang()
        return JinLiang(total // 16, total % 16)

    def __sub__(self, other):
        diff = abs(self.to_total_liang() - other.to_total_liang())
        return JinLiang(diff // 16, diff % 16)

    def __gt__(self, other):
        return self.to_total_liang() > other.to_total_liang()

    def __le__(self, other):
        return self.to_total_liang() <= other.to_total_liang()

    def __ge__(self, other):
        return self.to_total_liang() >= other.to_total_liang()